import request from '@/utils/request'

//查询学生信息
export function getStudentInfo(data) {
  return request({
    url: '/student/findStudent',
    method: 'post',
    data
  })
}
//查询老师信息
export function getTeacherInfo(data) {
  return request({
    url: '/student/findTeacher',
    method: 'post',
    data
  })
}
//删除学生信息
export function deleteStudentInfo(userId) {
  return request({
    url: '/student/deleteStudent',
    method: 'delete',
    params: {
      userId
    }
  })
}
//查询学院academy
export function getAcademyInfo( ) {
  return request({
    url: '/student/findAcademy',
    method: 'get'
  })
}
//根据id查询学生信息
export function getStudentInfoById(userId) {
  return request({
    url: '/student/findStudentById',
    method: 'get',
    params: {
      userId
    }
  })
}
//修改学生信息
export function updateStudentInfo(data) {
  return request({
    url: '/student/updateStudent',
    method: 'post',
    data
  })
}
//冻结或者解冻学生
export function freezeOrUnfreeze( userId, status) {
  return request({
    url: '/student/freezeOrUnfreeze',
    method:'put',
    params: {
      userId,
      status
    }
  })
}

//查询学生信息
export function getStudentInfoAccount(data) {
  return request({
    url: '/student/findStudentAccount',
    method: 'post',
    data
  })
}

//上传头像
export const uploadProjectFile  = (formData) => {
  return request({
    url: '/uploadProjectImg',
    method: 'post',
    data: formData
  })
}

